import { ref, shallowRef } from 'vue';

export const useTabs = (xs, activeKey) => ({
  tabs: ref(xs),
  compoMap: shallowRef(
    R.compose( R.fromPairs, R.map(R.props(['title', 'compo'])) )(xs)
  ),
  activeKey: ref(activeKey || xs[0].title),
});
